﻿<!-- #include file="mymin.asp" -->
<%
If Request.form("submit1") <> "" Then

	linkStyle=Request.Form("linkStyle")
	linkAct=Request.Form("linkAct")
	linkJump=Request.Form("linkJump")
	linkNum=Request.Form("linkNum")
	linkShort=Request.Form("linkShort")
	linkHide=Request.Form("linkHide")
	linkDelete=Request.Form("linkDelete")
	
	if linkStyle<>"1" then linkStyle = 0
	if linkJump<>"1" then linkJump = 0
	if linkAct<>"0" then linkAct = 1
	if linkNum="" or IsNumeric(linkNum)=False then linkNum = 30
	if linkNum>100 then linkNum=100
	if linkShort="" or IsNumeric(linkShort)=False then linkShort = 2
	if linkShort>4 then linkShort=4
	if linkHide="" or IsNumeric(linkHide)=False then linkHide = 10
	if linkHide>3000 then linkHide=3000
	if linkDelete="" or IsNumeric(linkDelete)=False then linkDelete = 500
	if linkDelete>3000 then linkDelete=3000

	'----------------------------------------------------------------
	'	生成link.asp文件
	'----------------------------------------------------------------
	dim HU_Config,HU_File

	HU_File= "../../config/link.asp"'生成link.asp文件路径

	HU_Config="<"&"%"
	HU_Config=HU_Config+chr(13)&chr(10)&"linkStyle="""&linkStyle&""" '友链首页排版"
	HU_Config=HU_Config+chr(13)&chr(10)&"linkAct="""&linkAct&""" '友链审核设置"
	HU_Config=HU_Config+chr(13)&chr(10)&"linkJump="""&linkJump&""" '友链跳转方式"
	HU_Config=HU_Config+chr(13)&chr(10)&"linkNum="""&linkNum&""" '友链每页显示条数"
	HU_Config=HU_Config+chr(13)&chr(10)&"linkShort="""&linkShort&""" '友链简称字数"
	HU_Config=HU_Config+chr(13)&chr(10)&"linkHide="""&linkHide&""" '无链入自动隐藏天数"
	HU_Config=HU_Config+chr(13)&chr(10)&"linkDelete="""&linkDelete&""" '无链入自动删除天数"
	HU_Config=HU_Config+chr(13)&chr(10)&"%"&">"
	Call savetofile(HU_Config,HU_File)
	Response.Write "<meta http-equiv=""refresh"" content=""1;url=index.asp?sid="&sid&"""><title></title></head><body><div class=""main320"">"
	Response.Write "成功设置！正在返回..."
else
	if linkStyle<>"1" then linkStyle = 0
	if linkJump<>"1" then linkJump = 0
	if linkAct<>"0" then linkAct = 1
	if linkNum="" or IsNumeric(linkNum)=False then linkNum = 30
	if linkShort="" or IsNumeric(linkShort)=False then linkShort = 2
	if linkShort>4 then linkShort=4
	if linkHide="" or IsNumeric(linkHide)=False then linkHide = 10
	if linkDelete="" or IsNumeric(linkDelete)=False then linkDelete = 500
%>
<title>网站友链配置</title></head><body><div class="main400">
<form method="post" action="link.asp">
<table>
<tr><td>友链首页排版:</td><td><select name="linkStyle">
<option value="0">横排经典</option>
<option value="1" <% if linkStyle="1" then w "selected"%>>简单分类</option>
</select></td></tr>
<tr><td>审核设置:</td><td><select name="linkAct">
<option value="1">必须审核</option>
<option value="0" <% if linkAct="0" then w "selected"%>>不用审核</option>
</select></td></tr>
<tr><td>跳转方式:</td><td><select name="linkJump">
<option value="0">二次跳转</option>
<option value="1" <% if linkJump="1" then w "selected"%>>直接跳转</option>
</select></td></tr>
<tr><td>友链每页显示条数:</td><td><input name="linkNum" type="text" value="<%=linkNum%>"/></td></tr>
<tr><td>友链简称字数:</td><td><input name="linkShort" type="text" value="<%=linkShort%>"/></td></tr>
<tr><td>无链入自动隐藏天数:</td><td><input name="linkHide" type="text" value="<%=linkHide%>"/></td></tr>
<tr><td>无链入自动删除天数:</td><td><input name="linkDelete" type="text" value="<%=linkDelete%>"/></td></tr>
</table>
<input type="submit" value="保存配置"/>
<input type="hidden" name="submit1" value="1"/>
<input type="hidden" name="sid" value="<%=sid%>"/>
</form>
<%end if%><br/>
<a href="index.asp?sid=<%=sid%>">[网站配置]</a><%call Last2%>